{extend name="template/base" /}
{block name="style"}
<!--select2样式 start -->
<link href="__LIB__/select2-4.0.3/dist/css/select2.min.css" rel="stylesheet" />
<!--select2样式 end -->
<link rel="stylesheet" href="__LIB__/webuploader/0.1.5/webuploader.css" />
<link rel="stylesheet" href="__LIB__/fontawesome-4.2.0_ie7/4.2.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="__LIB__/tags-input/dist/jquery.tagsinput.min.css" />
<style>
    .ui-menu-item{
        background:#cde69c;
        border-bottom: 1px solid #a5d24a;
        display:block;
        text-align:center;
        width:125px;
    }
    .ui-menu-item div{
        color:#638421;
        font-size:13px;
        display:inline-block;
        cursor:pointer;
        text-align:center;
        padding:10px;
    }
    .ui-menu-item:hover{
        background:#b8d483;
    }
</style>
{/block}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="order_id" value="{$order_id}">
        <input type="hidden" name="is_review" value="{$is_review}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">平台：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <select name="platform" class="select2"  id="platform">
                    <option value="">请选择添加的平台</option>
                    {volist name="platform" id="pf"}
                    <option value="{$pf.platform_name}">{$pf.name}</option>
                    {/volist}
                </select>
                <a class="btn btn-primary radius" data-title="添加平台" style="margin-top: 10px"  onclick="layer_open('平台','/admin/platform/index')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 平台</a>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">点评：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea radius" name="comment" value="{$vo.comment}" ></textarea>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">图片：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <!--dom结构部分-->
                <div id="head_img" class="uploader">
                    <!--用来存放item-->
                    <div  class="uploader-list fileList">
                        {notempty name="vo.head_img"}
                        <div id="head_img_1" class="file-item thumbnail upload-state-done">

                            <img width="100" height="100" src="{$vo['head_img']}">
                            <div class="info">{$vo['head_img']}</div>
                            <div class="del fa fa-trash-o"> 删除 </div>
                        </div>
                        <script>
                            $(function(){
                                $('#head_img_1').on("click", " .del", function(){

                                    var $li = $('#head_img_1');
                                    $li.remove();
                                })
                            })
                        </script>
                        {/notempty}
                    </div>
                    <div class="filePicker">选择图片</div>
                </div>

            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/webuploader/0.1.5/webuploader.js"></script>
<script type="text/javascript" src="__LIB__/webuploader/0.1.5/image-upload/uploadimg.js"></script>

<!--select2 js 插件-->
<script type="text/javascript" src="__LIB__/select2-4.0.3/dist/js/select2.min.js"></script>

<!--时间插件-->
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" charset="utf-8" src="__LIB__/tags-input/dist/jquery.tagsinput.js"></script>
<script type="text/javascript" charset="utf-8" src="__LIB__/tags-input/dist/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="_LIB__/tags-input/dist/jquery-ui.css" />
<script>
    $(function () {
        upload_imgs("head_img");
    })

    $("#form").Validform({
        tiptype: 2,
        ajaxPost: true,
        showAllError: true,
        callback: function (ret) {
            // console.log('ret',ret)
            ajax_progress(ret);
        }
    });

    var id = $("#platform").select2({
        language: "zh-CN", //设置 提示语言
        width: "100%", //设置下拉框的宽度
        theme: "classic"
    });
    {notempty name = "platform"}
    id.val("{$platform}").trigger("change");
    {/notempty}
</script>
{/block}
